#!/usr/bin/env bash
set -eu
archs='x86_64 arm aarch64'
gem5=-g
while getopts A:G OPT; do
  case "$OPT" in
    A)
      archs="$OPTARG"
      ;;
    G)
      gem5=
      ;;
  esac
done
shift "$(($OPTIND - 1))"
for arch in $archs; do
  ./build -a "$arch" -klq $gem5 "$@"
done
